package com.hwj.service.Impl;

import com.hwj.entity.UserSearchHistory;
import com.hwj.mapper.UserSearchHistoryMapper;
import com.hwj.service.UserSearchHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserSearchHistoryServiceImpl implements UserSearchHistoryService {
    @Autowired
    UserSearchHistoryMapper userSearchHistoryMapper;
    @Override
    public List<UserSearchHistory> listByUserId(Long userId) {
        return userSearchHistoryMapper.listByUserId(userId);
    }

    @Override
    public Boolean deleteById(Long id) {
        return userSearchHistoryMapper.deleteByPrimaryKey(id)>0;
    }

    @Override
    public List<UserSearchHistory> listHot() {
        return userSearchHistoryMapper.listHot();
    }
}
